package zhr.chapter12;

import zhr.chapter12.SubThread;

public class Example12_3 {
    public static void main(String[] args) {
        System.out.println("主线程开始运行");
        SubThread sbThread=new SubThread();
        sbThread.setName("SubThread");
        sbThread.start();
        try{
            Thread.sleep(1000);
        }catch (InterruptedException e){
            System.out.println(e.getMessage());
        }
        System.out.println("主线程运行结束");
    }
}
